package com.zhanghu.backendZray.utils;

import com.zhanghu.backendZray.constants.CommonConstant;
import org.springframework.util.DigestUtils;

/**
 * @author ZhangDong
 * @date 2024/8/2 17:58
 */
public class Md5Util {

    public static String get2Md5(String password) {
        String first = DigestUtils.md5DigestAsHex((password + CommonConstant.salt).getBytes());
        String result = DigestUtils.md5DigestAsHex((first + CommonConstant.salt).getBytes());
        return result;
    }

    public static void main(String[] args) {
        System.err.println(get2Md5("23443zfdffdg@tertert34563464564576575675677"));
    }
}
